package com.ruoyi.common.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.pojo.AreaLiandong;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("/combox")
@Api("combox框获取")
public class ComboxController {

    @Resource
    ComboxService servcie;
    @ApiOperation(value = "教师下拉框获取", tags = {"公共:下拉框"})
    @PreAuthorize("@ss.hasPermi('*:*:*')")
    @GetMapping("/teacher")
    public List<HashMap> getAllTacherCombox() {
        return servcie.getAllTacherCombox();
    }

    @PreAuthorize("@ss.hasPermi('*:*:*')")
    @ApiOperation(value = "班级下拉框获取", tags = {"公共:下拉框"})
    @GetMapping("/clazz")
    public List<HashMap> getAllClazzCombox() {
        return servcie.getAllClazzCombox();
    }

//    @PreAuthorize("@ss.hasPermi('*:*:*')")
    @ApiOperation(value = "班级下拉框获取", tags = {"公共:下拉框"})
    @GetMapping("/liandong1")
    public AjaxResult getliandong1() {
        return AjaxResult.success("成功了", servcie.getAllAreaLiandongCombox());
    }
}
